import multiprocessing
import asyncio


async def working(arg):
    count  = 10 * arg
    while True:
        print(f"---process{arg} is working-----")
        count -= 1
        if count <= 0:
            break
        await asyncio.sleep(arg)


def dosomething(arg):
    asyncio.run(working(arg))

if __name__ == '__main__':
    queue = multiprocessing.Queue()

    pool = multiprocessing.Pool()
    p1 = multiprocessing.Process(target=dosomething , args=[1])
    p2 = multiprocessing.Process(target=dosomething, args=[2])

    p1.start()
    p2.start()

    # p1.join()




    print(f"p1.id: {p1.pid}")
    print(f"p2.id: {p2.pid}")
